package topcoder;

public class RowAndManyCoins {

	public String getWinner(String cells){
		int a=0,b=0;
		boolean alice = (cells.charAt(0)=='A');
		for (int i = 0; i < cells.length(); i++) {
			if(cells.charAt(i)=='A' && (!alice || i==0)){
				a++;
				alice = true;
			}
			else if(cells.charAt(i)=='B' && (alice || i==0)){
				b++;
				alice = false;
			}
		}
		if(b > a)
			return "Bob";
		else
			return "Alice";
	}
}
